ElementTransformUtils.CopyElements
Description:
Copies a set of elements from source document to destination document.
Copies a set of elements from source document to destination document.
Remarks:
Copies are placed at their respective original locations or locations specified by the optional transformation.
This method can be used for copying non-view specific elements only. For copying view-specific elements, use the view-specific form of the CopyElements method.
The destination document can be the same as the source document.
This method performs rehosting of elements where applicable.
Overloads (3):
CopyElements(Document,ICollection[ElementId],Document,Transform,CopyPasteOptions)
-
sourceDocumentThe document that contains the elements to copy.
-
ICollection<ElementId>elementsToCopyThe set of elements to copy.
-
destinationDocumentThe destination document to paste the elements into.
-
transformThe transform for the new elements. Can be nulla null reference (Nothing in Visual Basic) if no transform is required.
-
optionsOptional settings. Can be nulla null reference (Nothing in Visual Basic) if default settings should be used.
-
The given element id set is empty. -or- One or more elements in elementsToCopy do not exist in the document. -or- Some of the elements cannot be copied, because they are view-specific.
-
A non-optional argument was null
-
The elements cannot be copied.
-
User cancelled the operation.